#include <iostream>
#include "factory.h"

int main(int argv, char**argc)
{
    printf("************  test hello zc!!!   **************\n");
    /* add test code! */
    try{
		EFactory *factory;
		Television *tv;
		AirConditioner *ac;
		factory = (EFactory*)ClassFactory::getInstance().getClassByName("HaierFactory");
		tv = factory->produceTelevision();
		tv->play();
		ac = factory->produceAirConditioner();
		ac->changeTemperature();
	}catch(const string e){
		std::cout << e << endl;
	}
    return 0;
}